home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Storm
/
Scene Storm - Volume 1.iso
/
coding
/
c
/
analogjoystick
/
readme
< prev
next >
Wrap
Text File
|
1980-01-07
|
3KB
|
62 lines
Welcome to the world of analog joysticks.
You may well wonder what would prompt someone to write a bunch of code
and design some hardware to do analog joystick input. Someone had to.
I have seen many other individuals do wonderful things in the "freeware"
arena, and decided to do something too. This was a niche I saw that
I thought that I could contribute to. It also really aggravated me
to know that my Amiga could do this type of joystick support, yet few
are willing to put the time and effort into any commercial application.
This after what, almost four years?
Well, here it is, free, ready for the taking. So get to it! I hope
to see it used in everything it makes sense for. It's small, it's easy,
and it's done already. There are no more excuses.
Included in this distribution is a driver (part assembly, part 'C',)
a header file for the 'C' code that calls the driver, and an example
program that uses the driver. All this code appeared in the July 1989
issue of Amazing Computing (sporting the freely redistributable not
for profit, free to use in commercial application banner). Distribution
on Fish Disks was specifically double-checked with PIM publications, but
the intent has always been for widespread distribution and use.
Enjoy,
Dave Kinzer
For information on how to build an IBM/Apple joystick adapter, you
should consult the July 1989 issue of Amazing Computing (Vol. 4 No. 7).
The theory of operation and an explanation of the driver (as well as
listings) are there also.
Part of the second paragraph below was omitted in the printing of
the magazine (at the first page break). Far be it from me to complain
(I don't know the first thing about publishing,) but it reads better
as written:
For each axis, the current flowing through the variable resistor
(in the joystick) from +5 Volts reaches the two resistors in the adapter.
Since the voltage on the op-amp output and the voltage on the Amiga input
are the same, the voltage across the resistors are the same. This results
in the current always being split in a constant ratio. The ratio of the
resistor values control the ratio of the current split. By selecting the
appropriate resistances, the current into the computer is reduced to the
amount that would flow if an ideal joystick were attached.
Selecting the resistance values for the design requires evaluating a
trade-off. A higher resistance reduces the undesirable effects of the
input offset voltage of the op-amp (in this configuration, this means that
the voltage on the output is not exactly as what is on the positive input).
Too high a resistance will result in the voltage not rising fast enough in
the minimum resistance joystick position.